package com.wolfpire.workflow.assign;

import java.util.ArrayList;
import java.util.List;

import org.jbpm.api.listener.EventListener;
import org.jbpm.api.listener.EventListenerExecution;

public class DefaultEventListenerImpl implements EventListener {
	
	private static final long serialVersionUID = -8169412372534608414L;
	private String msg = "error";
	

	@SuppressWarnings("unchecked")
	public void notify(EventListenerExecution execution) throws Exception {
		List<String> logs = (List<String>) execution.getVariable("logs");
		if (logs==null) {
			logs = new ArrayList<String>();
			execution.setVariable("logs", logs);
		}
		logs.add(msg);
		execution.setVariable("logs", logs);
		//System.out.println("触发了事件监听，当前活动为："+execution.getActivity());
	}



}
